function upArray(arr) {
    if(arr.length>0&&!isNaN(Number(arr.join('')))&&arr.join("").length==arr.length){
        for (let i = arr.length - 1; i >= 0; i--) {
            arr[i]++
            if (arr[i] == 10) {
                arr[i] = arr[i] % 10;
            } else {
                return arr[i]<10?arr:null;
            }
        }
        arr.unshift(1)
        return arr;
    } else {
        return null
    }
}

console.log(upArray([]));